import { Link, useNavigate } from "react-router-dom";

export default function Login() {
    const navigate = useNavigate();
    return (
        <div>
            <Link to='/home'>跳转到首页</Link>
            <button onClick={() => navigate('/home')}>跳转到首页</button>
            <button onClick={() => navigate('/home?id=1000&name=jack')}>SearchParams传参</button>
            {/* <button onClick={() => navigate('/home/100/jack')}>Params传参</button> */}
        </div>
    )
}
